import 'package:ncov_2019/config/api.dart';
import 'package:ncov_2019/http/my_req_model.dart';

/*
* 按时间线获取事件 - 请求
* */
class TimeNewsReqModel extends ReqModel {
  @override
  String url() => API.getAllScore;

  @override
  Map params() => {};

  Future data() => get();
}

/*
* 按时间线获取事件 - 响应
*
* @param summary 概要
* @param sourceUrl 原文Url
* @param modifyTime 更新时间
* @param createTime 创建时间
* @param id 事件Id
* @param provinceName 省份名称
* @param title 标题
* @param pubDate 发布日期时间戳
* @param pubDateStr 发布日期文本
* @param provinceId 地区编号
* @param infoSource 信息来源
* */
class ForTimeNewsModel {
  int scoreId;  //编号
  int scoreValue; // 年龄
  String scoreType;  //性别
  String studentName; // name
  String studentId;    //出行信息

  ForTimeNewsModel({
    this.scoreId,
    this.scoreValue,
    this.scoreType,
    this.studentName,
    this.studentId,
  });

   ForTimeNewsModel.fromJson(Map<String, dynamic> json) {
     print(json);
     scoreId = json['scoreId'];
     scoreValue = json['scoreValue'];
     scoreType = json['scoreType'];
     studentName = json['studentName'];
     studentId = json['studentId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['scoreId'] = this.scoreId;
    data['scoreValue'] = this.scoreValue;
    data['scoreType'] = this.scoreType;
    data['studentName'] = this.studentName;
    data['studentId'] = this.studentId;
    return data;
  }
}
